//
//  PingLunViewController.m
//  ShangChengMoBan
//
//  Created by yaoqi yaoqi on 16/9/2.
//  Copyright © 2016年 ping. All rights reserved.
//  用户评论界面

#import "PingLunViewController.h"
#import "PingLunContentViewController.h"
#import "YContainerViewController.h"

@interface PingLunViewController ()<YContainerViewControllerDelegate>

@end

@implementation PingLunViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor whiteColor];
    PingLunContentViewController * all =[[PingLunContentViewController alloc]init];
    all.title =@"全部";
    all.num = 0;
    [all headRefresh];
    PingLunContentViewController * fuKuan =[[PingLunContentViewController alloc]init];
    fuKuan.title =@"晒图";
    fuKuan.num = 1;
    [fuKuan headRefresh];
    PingLunContentViewController * faHuo =[[PingLunContentViewController alloc]init];
    faHuo.title =@"低分";
    faHuo . num = 2;
    [faHuo headRefresh];
    PingLunContentViewController * shouHuo =[[PingLunContentViewController alloc]init];
    shouHuo.title =@"最新";
    shouHuo.num = 3;
    [shouHuo headRefresh];
   
    YContainerViewController * ysl = [[YContainerViewController alloc]initWithControllers:@[all,fuKuan,faHuo,shouHuo] topBarHeight:64 parentViewController:self];
    ysl.delegate = self;
    ysl.menuBackGroudColor = [UIColor whiteColor];
    ysl.menuItemSelectedTitleColor =[UIColor colorWithHue:0.96 saturation:1.00 brightness:1.00 alpha:1.00];
    ysl.menuIndicatorColor = [UIColor colorWithHue:0.96 saturation:1.00 brightness:1.00 alpha:1.00];
    ysl.menuItemTitleColor = MaintextColor;
    [self.view addSubview:ysl.view];
    [self drawNavWithTitle:@"用户评论" WithColor:[UIColor colorWithHue:0.00 saturation:0.00 brightness:1.00 alpha:1.00]];
    [self drawBackButton];
    
}
#pragma mark 转换页面调用
- (void)containerViewItemIndex:(NSInteger)index currentController:(UIViewController *)controller{
    [((PingLunContentViewController*)controller) headWithRequset];
}



- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
